Skip to content

Types of programming language, translators and integrated development environments (IDEs)

Alt text

Alt text

Programming language

  • Programmers use many different programming languages to communicate with computers.
  • Computers only ‘understand’ their own language, called machine code.
  • A program needs to be translated into machine code before it can be ‘understood’ by a computer.
  • A computer program is a list of instructions that enable a computer to perform a specific task.
  • Computer programs can be written in high-level languages and low-level languages depending on the task to be performed and the computer to be used.
  • Most programmers write programs in high-level languages.

Alt text

High-level languages

  • High-level languages enable a programmer to focus on the problem to be solved and require no knowledge of the hardware and instruction set of the computer that will use the program.

  • There are many different high-level programming languages in use today including C++, Delphi, Java, Pascal, Python, Visual Basic and many more.

  • The benefits of high-level languages are:

    • read and understand as the language used is closer to English
    • write in a shorter time
    • debug at the development stage
    • maintain once in use.

Alt text

Low-level languages

  • Low-level languages relate to the specific architecture and hardware of a particular type of computer.
  • Low-level languages can refer to machine code, the binary instructions that a computer understands, or assembly language that needs to be translated into machine code.
  • Programmers do not usually write in machine code as it is difficult to understand, and it can be complicated to manage data manipulation and storage.

Alt text

High-level vs Low-level languages

LanguageAdvantagesDisadvantages
High-levelindependent of the type of computer being used
easier to read, write and understand programs
quicker to write programs
programs are easier and quicker to debug
easier to maintain programs in use
programs can be larger
programs can take longerto execute
programs may not beable make use of special hardware
Low-levelcan make use of special hardware
includes special machine-dependent instructions
can write code that doesn't take up much spacein primary memory
can write code that performs a task very quickly
it takes a longer time towrite and debug programs
programs are moredifficult to understand

Assembly languages

  • Fewer programmers write programs in an assembly language.

  • Those programmers who do, do so for the following reasons:

    • to make use of special hardware
    • to make use of special machine-dependent instructions
    • to write code that doesn’t take up much space in primary memory
    • to write code that performs a task very quickly.
  • Assembly language needs to be translated into machine code using an assembler in order to run

Alt text

Translators

  • Computer programs can exist in several forms.
  • Programs are written by humans in a form that people who are trained as computer programmers can understand.
  • In order to be used by a computer, programs need to be translated into the binary instructions, machine code, that the computer understands.
  • A program must be translated into binary before a computer can use it; this is done by a utility program called a translator.
  • There are several types of translator program in use; each one performs a different task.

Alt text

Compiler

  • A compiler is a computer program that translates an entire program written in a high-level language (HLL) into machine code all in one go so that it can be directly used by a computer to perform a required task.
  • Once a program is compiled the machine code can be used again and again to perform the same task without re-compilation.
  • If errors are detected, then an error report is produced instead of a compiled program.

Alt text

Interpreter

  • An interpreter is a computer program that reads a statement from a program written in a high-level language, translates it, performs the action specified and then does the same with the next statement and so on.

  • If there is an error in the statement then execution ceases and an error message is output, sometimes with a suggested correction.

  • A program needs to be interpreted again each time it is run.

Assembler

  • An assembler is a computer program that translates a program written in an assembly language into machine code so that it can be directly used by a computer to perform a required task.
  • Once a program is assembled the machine code can be used again and again to perform the same task without re-assembly.

Alt text

Translators comparison

CompilerInterpreterAssembler
Translate h-lExecute h-lTranslate l-l
Executable fileNo executable fileExecutable file
One h-l to severalmachine codeOne h-l to severalmachine codeOne l-l to onemachine code
Program can use withoutProgram can not use withoutProgram can use without
General useUsedin developingGeneral use

Integrated Development Environment (IDE)

  • An Integrated Development Environment (IDE) is used by programmers to aid the writing and development of programs. There are many different IDEs available; You may be using PyCharm (for Python), Visual Studio (for Visual Basic) or BlueJ (for Java) as your IDE.

  • IDEs usually have these features:

    • code editors
    • a translator
    • a runtime environment with a debugger
    • error diagnostics
    • auto-completion
    • auto-correction
    • an auto-documenter and prettyprinting.

Code editor

Alt text

A runtime environment with a debugger

Alt text

Error diagnostics and auto-correction

Alt text

Auto-completion

Alt text

Auto-documenter and prettyprinting

Alt text